{include file="common/head"/}
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try{ace.settings.check('main-container' , 'fixed')}catch(e){}
    </script>
    {include file="common/left"}
    <div class="main-content">
        <div class="main-content-inner">
            {include file="common/header_nav"}
            <div class="page-content">
                <div class="row maintop">
                    <form name="admin_list_sea" class="form-search" method="post" action="{:url('message')}">
                        <div class="col-xs-12 col-sm-6 btn-sespan">
                            <div class="input-group">
                                <span class="input-group-addon">
                                    <i class="ace-icon fa  fa-search"></i>
                                </span>
                                <input type="text" name="key" id="key" class="form-control search-query admin_sea" value="{$testkey}" placeholder="输入检索内容" />
                                <span class="input-group-btn">
                                    <button type="submit" class="btn btn-xs btm-input btn-purple">
                                        搜索
                                    </button>
                                </span>
                            </div>
                        </div>
                    </form>
                    <div class="input-group-btn">
                        <a href="{:url('message')}">
                            <button type="button" class="btn btn-xs all-btn btn-purple">
                                <span class="ace-icon fa fa-globe icon-on-right bigger-110"></span>
                                显示全部
                            </button>
                        </a>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <div class="table-responsive">
                            <table id="dynamic-table" class="table table-striped table-bordered table-hover center">
                                <thead>
                                <tr>
                                    <th class="center">称呼</th>
                                    <th class="center">电话</th>
                                    <th class="center">内容</th>
                                    <th class="center">留言时间</th>
                                    <th class="center">IP</th>
                                    <th class="center" style="border-right:#CCC solid 1px;width: 120px;">操作</th>
                                </tr>
                                </thead>

                                <tbody>
                                {volist name="messageList" id="v"}
                                <tr>
                                    <td>{$v.name}</td>
                                    <td>{$v.tel}</td>
                                    <td>{$v.content}</td>
                                    <td>{$v.addtime|date='Y-m-d',###}</td>
                                    <td>{$v.ip}</td>
                                    <td>
                                        <div class="action-buttons">
                                            <a class="red" href="javascript:;" onclick="return del({$v.message_id});" title="删除">
                                                <i class="ace-icon fa fa-trash-o bigger-130"></i>
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                                {/volist}
                                <tr>
                                    <td colspan="6" align="right">{$page}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    {include file="common/foot" /}
</div>
<script>
    function del(id){
        layer.confirm('你确定要删除吗？', {icon: 3}, function(index){
            layer.close(index);
            window.location.href="{:url('messageDel')}?message_id="+id;
        });
    }
</script>
</body>
</html>
